package day5;

import java.util.Scanner;

public class A {

// 实例方法-对象方法，必须得有实例/对象才能调用
    public String toString() {
        return "haha";
    }
    public int method1() {
        if(1==1) {
            return 2;
        }
        System.out.println("222");
        return 10;
    }
    public static void main(String[] args) throws Throwable {
        A a = new A();
        System.out.println(a.method1());
    }
}
